﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="TagCloudSelection.aspx.vb" Inherits="_3dBuzz.TagCloudSelection" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <p>
        <br />
        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
            DataSourceID="SqlDataSource1" AllowSorting="True">
            <Columns>
                <asp:BoundField DataField="Tags" HeaderText="Tag" SortExpression="Tags" >
                <HeaderStyle CssClass="columnhead" />
                </asp:BoundField>
                <asp:BoundField DataField="Title" HeaderText="Title" SortExpression="Title" >
                <HeaderStyle CssClass="columnhead" />
                </asp:BoundField>
                <asp:BoundField DataField="Nickname" HeaderText="Artist" 
                    SortExpression="Nickname" >
                <HeaderStyle CssClass="columnhead" />
                </asp:BoundField>
 <asp:BoundField DataField="OriginalFilename" HeaderText="File name" 
                    SortExpression="File name" >
                <HeaderStyle CssClass="columnhead" />
                </asp:BoundField>
                <asp:HyperLinkField HeaderText="View Video" Text="Select" 
                    DataNavigateUrlFields="VideoId" 
                    DataNavigateUrlFormatString="VideoDetail.aspx?VideoId={0}" >
                <HeaderStyle CssClass="columnhead" />
                </asp:HyperLinkField>
            </Columns>
        </asp:GridView>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
            ConnectionString="<%$ ConnectionStrings:3dBuzzDatabase %>" 
            ProviderName="<%$ ConnectionStrings:3dBuzzDatabase.ProviderName %>" SelectCommand="SELECT Tags.[Tags], Video.[VideoId], Video.[OriginalFilename], Video.[ArtistId], Video.[Title], Artists.[Nickname]
FROM Artists INNER JOIN (Video INNER JOIN (Tags INNER JOIN VideoTagJunction ON Tags.[ID] = VideoTagJunction.[Tag_fkid]) ON Video.[VideoId] = VideoTagJunction.[Video_fkid]) ON Artists.ID = Video.ArtistId
WHERE (((Tags.ID)=?))
">
            <SelectParameters>
                <asp:QueryStringParameter Name="?" QueryStringField="ID" />
            </SelectParameters>
        </asp:SqlDataSource>
    </p>
    <p>
        &nbsp;</p>
    <p>
    </p>
</asp:Content>
